import React, { Component } from 'react';
import {} from 'antd';
import { queryText } from '../../services/api';
import reqwest from 'reqwest';

export default class WebTxt extends Component {
  state = {
    value: 1,
  };
  componentDidMount = () => {
    const { src } = this.props;
    reqwest({
      url: src,
      method: 'get',
      processData: false,
      crossOrigin: true,
      withCredentials: true,
      success: response => {
        //console.log('response', response);
        this.setState({
          value: response,
        });
      },
    });
  };

  render() {
    return (
      <div>
        <span>{this.state.value}</span>
      </div>
    );
  }
}
